package com.czxy.tanhua.mongo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;

/**
 * @Author 爱吃豆的土豆、
 * @Date 2023/4/8 13:54
 */
@Document("movement")
@AllArgsConstructor
@NoArgsConstructor
@Data
public class Movement implements Serializable {
    @Id
    private ObjectId id;
    @Field("pid")
    private Long pid;
    @Field("userId")
    private Long userId;
    @Field("textContent")
    private String textContent;
    @Field("medias")
    private String[] medias;
    @Field("state")
    private Integer state = 0;
    @Field("longitude")
    private Double longitude;
    @Field("latitude")
    private Double latitude;
    @Field("locationName")
    private String locationName;
    @Field("created")
    private Long created;
    @Field("commentCount")
    private Integer commentCount = 0;

    @Field("likeCount")
    private Integer likeCount = 0;

    @Field("loveCount")
    private Integer loveCount = 0;
}
